<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean"%> 
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html"%>
 
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
 
<%@ page isELIgnored="false" %>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html lang="true">
  <head>
    
    <title>testComment.jsp</title>
	<script src="../dwr/interface/CommentAction.js"></script>
		<script src="../dwr/engine.js"></script> 
		<script src="../dwr/util.js"></script>
		<script type="text/javascript">
		function add(){
				var content = DWRUtil.getValue("content");
				var receiveUserNo = DWRUtil.getValue("receiveUserNo");
				var comment = {content:content, receiveUserNo:receiveUserNo, type:3,foreignId:${param.id}};
				CommentAction.comment(comment, callBack);
			}
			
			function callBack(data){
				
					alert(data);
				
			}
		
		</script>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
    <html:form action="leave.do?method=gbook&uid=${param.uid}">
			<input id="receiveUserNo" type="hidden" name="receiveUserNo" value="${param.uid}"/>
			content : <html:textarea property="content"/><html:errors property="content"/><br/>
			<html:submit/><html:cancel/>
			<input type="button" value="dwr 发送" onclick="add()"/>
	</html:form>
  </body>
</html:html>
